import request from '@/utils/request'

// 查询普通消息推送列表
export function listMessage(query) {
  return request({
    url: '/enterprise/messageCenter/ordinaryMessage/list',
    method: 'get',
    params: query
  })
}

// 查询普通消息推送详细
export function getMessage(ordinaryMessageId) {
  return request({
    url: '/enterprise/messageCenter/ordinaryMessage/' + ordinaryMessageId,
    method: 'get'
  })
}

// 新增普通消息推送
export function addMessage(data) {
  return request({
    url: '/enterprise/messageCenter/ordinaryMessage',
    method: 'post',
    data: data
  })
}

// 修改普通消息推送
export function updateMessage(data) {
  return request({
    url: '/enterprise/messageCenter/ordinaryMessage',
    method: 'put',
    data: data
  })
}

// 删除普通消息推送
export function delMessage(ordinaryMessageId) {
  return request({
    url: '/enterprise/messageCenter/ordinaryMessage/' + ordinaryMessageId,
    method: 'delete'
  })
}
